package com.cyf.smartCity;


import com.cyf.smartCity.bean.*;
import com.cyf.smartCity.service.RecordSummaryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api("智慧停管平台-记录汇总")
@RequestMapping(value = "record/")
public class RecordSummaryHttpController {

    @Autowired
    private RecordSummaryService recordSummaryService;

    @PostMapping("inOutParking/list")
    @ApiOperation(value = "出场记录")
    public WechatParkListInOutParkingRsp listInOutParking(@RequestBody WechatParkListInOutParkingReq req) {
        return recordSummaryService.listInOutParking(req);
    }

    @PostMapping("inParking/list")
    @ApiOperation(value = "获取场内车辆列表")
    public WechatParkListInParkingRsp listInParking(@RequestBody WechatParkListInParkingReq req) {
        return recordSummaryService.listInParking(req);
    }

    @PostMapping("rechargeRefund/list")
    @ApiOperation(value = "获取缴费记录（充值退费记录）")
    public WechatParkListRechargeRefundRsp listRechargeRefund(@RequestBody WechatParkListRechargeRefundReq req) {
        return recordSummaryService.listRechargeRefund(req);
    }

    @PostMapping("warningCar/list")
    @ApiOperation(value = "获取预警车辆列表")
    public WechatParkListWarningCarRsp listWarningCar(@RequestBody WechatParkListWarningCarReq req) {
        return recordSummaryService.listWarningCar(req);
    }

    @PostMapping("warningCar/add")
    @ApiOperation(value = "添加预警车辆")
    public WechatParkBasicRsp addWarningCar(@RequestBody WechatParkAddWarningCarReq req) {
        return recordSummaryService.addWarningCar(req);
    }

    @PostMapping("warningCar/edit")
    @ApiOperation(value = "编辑预警车辆")
    public WechatParkBasicRsp editWarningCar(@RequestBody WechatParkEditWarningCarReq req) {
        return recordSummaryService.editWarningCar(req);
    }

    @PostMapping("warningCar/delete")
    @ApiOperation(value = "删除预警车辆")
    public WechatParkBasicRsp deleteWarningCar(@RequestParam Integer id) {
        return recordSummaryService.deleteWarningCar(id);
    }

    @PostMapping("redPacketRecordList")
    @ApiOperation(value = "红包找零记录")
    public RedPacketRecordRsp redPacketRecordList(@RequestBody RedPacketReq req ) {
        return recordSummaryService.redPacketRecordList(req);
    }

    @PostMapping("redPacketRechargeList")
    @ApiOperation(value = "红包充值记录")
    public RedPacketRechargeRsp redPacketRechargeList(@RequestBody RedPacketReq req ) {
        return recordSummaryService.redPacketRechargeList(req);
    }

}
